Integrand size = 41, antiderivative size = 134 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} a^2 (2 A+3 B+4 C) x+\frac {a^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 (2 A+3 B+2 C) \sin (c+d x)}{2 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {(2 A+3 B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{6 d} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {4171, 4102, 4081, 3855} \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 (2 A+3 B+2 C) \sin (c+d x)}{2 d}+\frac {(2 A+3 B) \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{6 d}+\frac {1}{2} a^2 x (2 A+3 B+4 C)+\frac {a^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d} \]
[In]
[Out]
Rule 3855
Rule 4081
Rule 4102
Rule 4171
Rubi steps \begin{align*} \text {integral}& = \frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {\int \cos ^2(c+d x) (a+a \sec (c+d x))^2 (a (2 A+3 B)+3 a C \sec (c+d x)) \, dx}{3 a} \\ & = \frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {(2 A+3 B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{6 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x)) \left (3 a^2 (2 A+3 B+2 C)+6 a^2 C \sec (c+d x)\right ) \, dx}{6 a} \\ & = \frac {a^2 (2 A+3 B+2 C) \sin (c+d x)}{2 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {(2 A+3 B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{6 d}-\frac {\int \left (-3 a^3 (2 A+3 B+4 C)-6 a^3 C \sec (c+d x)\right ) \, dx}{6 a} \\ & = \frac {1}{2} a^2 (2 A+3 B+4 C) x+\frac {a^2 (2 A+3 B+2 C) \sin (c+d x)}{2 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {(2 A+3 B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{6 d}+\left (a^2 C\right ) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} a^2 (2 A+3 B+4 C) x+\frac {a^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 (2 A+3 B+2 C) \sin (c+d x)}{2 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {(2 A+3 B) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{6 d} \\ \end{align*}
Time = 0.85 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.90 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 \left (12 A d x+18 B d x+24 C d x-12 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+3 (7 A+8 B+4 C) \sin (c+d x)+3 (2 A+B) \sin (2 (c+d x))+A \sin (3 (c+d x))\right )}{12 d} \]
[In]
[Out]
Time = 0.32 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.72
method | result | size |
parallelrisch | \(\frac {a^{2} \left (-12 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (6 A +3 B \right ) \sin \left (2 d x +2 c \right )+A \sin \left (3 d x +3 c \right )+\left (21 A +24 B +12 C \right ) \sin \left (d x +c \right )+12 x d \left (A +\frac {3 B}{2}+2 C \right )\right )}{12 d}\) | \(97\) |
derivativedivides | \(\frac {a^{2} A \sin \left (d x +c \right )+B \,a^{2} \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 a^{2} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \,a^{2} \sin \left (d x +c \right )+2 C \,a^{2} \left (d x +c \right )+\frac {a^{2} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \sin \left (d x +c \right )}{d}\) | \(157\) |
default | \(\frac {a^{2} A \sin \left (d x +c \right )+B \,a^{2} \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 a^{2} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \,a^{2} \sin \left (d x +c \right )+2 C \,a^{2} \left (d x +c \right )+\frac {a^{2} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+B \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \sin \left (d x +c \right )}{d}\) | \(157\) |
risch | \(a^{2} A x +\frac {3 a^{2} B x}{2}+2 a^{2} x C -\frac {7 i a^{2} A \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {i B \,a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {7 i a^{2} A \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{2}}{d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}+\frac {a^{2} A \sin \left (3 d x +3 c \right )}{12 d}+\frac {a^{2} A \sin \left (2 d x +2 c \right )}{2 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{2}}{4 d}\) | \(233\) |
norman | \(\frac {\left (-a^{2} A -\frac {3}{2} B \,a^{2}-2 C \,a^{2}\right ) x +\left (-3 a^{2} A -\frac {9}{2} B \,a^{2}-6 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (a^{2} A +\frac {3}{2} B \,a^{2}+2 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (3 a^{2} A +\frac {9}{2} B \,a^{2}+6 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {a^{2} \left (2 A +3 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {a^{2} \left (2 A +3 B +6 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{3 d}-\frac {2 a^{2} \left (2 A +5 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {2 a^{2} \left (2 A -2 C -3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {a^{2} \left (6 A +5 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a^{2} \left (38 A +21 B +6 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}+\frac {C \,a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \,a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(362\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.81 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (2 \, A + 3 \, B + 4 \, C\right )} a^{2} d x + 3 \, C a^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, C a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, A a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right ) + 2 \, {\left (5 \, A + 6 \, B + 3 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \]
[In]
[Out]
\[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^{2} \left (\int A \cos ^{3}{\left (c + d x \right )}\, dx + \int 2 A \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int A \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 B \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 C \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.19 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} - 6 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 12 \, {\left (d x + c\right )} B a^{2} - 24 \, {\left (d x + c\right )} C a^{2} - 6 \, C a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, A a^{2} \sin \left (d x + c\right ) - 24 \, B a^{2} \sin \left (d x + c\right ) - 12 \, C a^{2} \sin \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.75 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 \, C a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6 \, C a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (2 \, A a^{2} + 3 \, B a^{2} + 4 \, C a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 16 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 18 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 16.36 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.66 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {7\,A\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {2\,B\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {C\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,B\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,C\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {A\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
[In]
[Out]